import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { PAN_PATH_HOME } from '../../constant';
import './index.less';

class Error extends PureComponent {

  static propTypes = {
    history: PropTypes.object
  };

  backHome = () => {
    this.props.history.push(PAN_PATH_HOME);
  };

  back = () => {
    this.props.history.back();
  };

  render () {
    return (
      <div className="error_bg">
        <button className="error_bg_back_home" onClick={this.backHome}/>
        <button className="error_bg_back" onClick={this.back}/>
      </div>
    );
  }
}

export default Error;
